package client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import pojo.ResponseResult;

import java.util.List;

/**
 * @author HGD
 * @date 2022/10/9 15:15
 */
@FeignClient("user")
public interface UserClient {
    /**
     * 部门审批人员获取所有本部门的用户id
     *
     * @param userId 部门审批人员id
     * @return 所有本部门的用户id
     */
    @PostMapping("/approve/getUsersByDepartment")
    ResponseResult<List<Long>> getUsersByDepartment(@RequestParam("userId") Long userId);

    @PostMapping("/login")
    ResponseResult<Boolean> checkLogin(@RequestParam String userName
            ,  @RequestParam  String password
            ,   @RequestParam Long rightsId);
}
